package com.example.demo.design.responsibility;

public class ProcessorImplTwo extends AbstractProcessor {

    public ProcessorImplTwo(Processor processor) {
        super(processor);
    }


    @Override
    public void process(String param) {
        if ("2".equals(param)) {
            System.out.println("ProcessorImplTwo,{} -> " + param);
        }else {
            getNextProcessor().process(param);
        }
    }
}
